﻿@inject IStringLocalizer<BootstrapBlazor.Shared.Samples.Markdowns> Localizer

<Button Text="@Localizer["MarkdownsAsyncButtonText"]" IsAsync="true" OnClick="GetAsyncString" Icon="fa-solid fa-font-awesome" class="mb-3" />
<Markdown Value="@AsyncValue" @ref="MarkdownSetValue"></Markdown>

@code {
    private string? AsyncValue { get; set; }

    [NotNull]
    private Markdown? MarkdownSetValue { get; set; }

    private async Task GetAsyncString()
    {
        await Task.Delay(600);
        AsyncValue = $"### {DateTime.Now}";
        await MarkdownSetValue.SetValue(AsyncValue);
    }
}
